﻿
jQuery.extend({
    //获取长度为32的Guid字符串
    getGuid32: function () {
        var rt_str = String.fromCharCode(65 + Math.floor(Math.random() * 26));
        for (i = 0; i < 31; ++i) {
            var num = Math.floor(Math.random() * (26 + 26 + 10));
            var ch_str;
            if (num < 10) {
                ch_str = num.toString();
            }
            else if (num < 10 + 26) {
                ch_str = String.fromCharCode(65 + num - 10);
            }
            else {
                ch_str = String.fromCharCode(97 + num - 10 - 26);
            }
            rt_str += ch_str;
        }
        return rt_str;
    }
});